package com.itheima.bos.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import com.itheima.bos.domain.base.Standard;

public interface StandardRepository extends JpaRepository<Standard, Integer>{

	public List<Standard> findByName(String name);

	public List<Standard> findByNameLike(String name);
	
	@Query(value="from Standard where name = ?1")
	public Standard QueryName(String name);

	@Query
	public List<Standard> QueryLikeName(String name);
	
	@Query
	@Modifying
	public void updateByName(String oldName, String newName);
}
